home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
gnuish
/
swalibas
/
sw_mode.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-09-10
|
2KB
|
62 lines
/* sw_mode.c - set the swapping mode
Copyright (C) 1990 by Thorsten Ohl, td12@ddagsi3.bitnet
This file is part of SWAPLIB (the library), a library for efficient
execution of child processes under MS-DOS.
The library is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
The library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the library; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Header: e:/gnu/swaplib/RCS/sw_mode.c'v 0.9 90/09/09 21:44:03 tho Stable $
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "swaplib.h"
enum swap_swapping_mode
swap_set_swapping_mode (char *cmd, char **argv)
{
/* Default to XMS. */
enum swapping_mode mode = xms;
char *env = getenv ("SWAPPING");
if (!env)
return mode;
if (strcmp ("xms", env) == 0)
mode = xms;
else if (strcmp ("ems", env) == 0)
mode = ems;
else if (strcmp ("disk", env) == 0)
mode = disk;
else if (strcmp ("none", env) == 0)
mode = none;
return mode;
}
/*
* Local Variables:
* mode:C
* ChangeLog:ChangeLog
* compile-command:make
* End:
*/